home *** CD-ROM | disk | FTP | other *** search
/ Hot Super Models / Hot Super Models.iso / unix / x11 / xv2r1.tar / xv2r1 / extensions / xv / include / xvrop.h < prev   
C/C++ Source or Header  |  1991-09-20  |  4KB  |  155 lines

  1. /***********************************************************
  2. Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
  3. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  4.  
  5.                         All Rights Reserved
  6.  
  7. Permission to use, copy, modify, and distribute this software and its 
  8. documentation for any purpose and without fee is hereby granted, 
  9. provided that the above copyright notice appear in all copies and that
  10. both that copyright notice and this permission notice appear in 
  11. supporting documentation, and that the names of Digital or MIT not be
  12. used in advertising or publicity pertaining to distribution of the
  13. software without specific, written prior permission.  
  14.  
  15. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  16. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  17. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  18. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  19. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  20. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21. SOFTWARE.
  22.  
  23. ******************************************************************/
  24. /*
  25. ** File: 
  26. **
  27. **   xvrop.h --- Xv RasterOps device dependent header file
  28. **
  29. ** Author: 
  30. **
  31. **   David Carver (Digital Workstation Engineering/Project Athena)
  32. **
  33. ** Revisions:
  34. **
  35. **   29.08.91 Carver
  36. **     - added support for video in StaticGray windows
  37. **     - added field to Port priv to store handle to rop and libpip: prop
  38. **
  39. **   26.06.91 Carver
  40. **     - fixed GC wrappers
  41. **
  42. **   04.06.91 Carver
  43. **     - changed interface to libpip.c, use new libpip.h header file
  44. **     - changed assignment of encoding id's
  45. **
  46. **   31.05.91 Carver
  47. **     - made big fixes to occlusion stuff
  48. **
  49. **   29.05.91 Carver
  50. **     - added serialNumber to port private structure.
  51. **
  52. **   15.05.91 Carver
  53. **     - version 2.0 upgrade
  54. **
  55. **   19.03.91 Carver
  56. **     - original port for v1r4
  57. **
  58. **
  59. */
  60. #ifndef XVROP_H
  61. #define XVROP_H
  62.  
  63. #include "Xvproto.h"
  64. #include "region.h"
  65. #include "libpip.h"
  66.  
  67. #ifdef GLOBAL
  68. #define EXTERNAL
  69. #define INIT(i) = {i}
  70. #else GLOBAL
  71. #define EXTERNAL extern
  72. #define INIT(i)
  73. #endif
  74.  
  75. #define XVROP_NUM_ADAPTORS 1
  76.  
  77. typedef struct _XvropPortRec {
  78.   GCPtr pGC;
  79.   int vx,vy,dx,dy;
  80.   unsigned int vw,vh,dw,dh;
  81.   BoxRec enabled_box;
  82.   XvEncodingPtr pEncoding;
  83.   int hue,saturation,brightness,contrast;
  84.   unsigned long serialNumber;
  85.   GCFuncs *wrapFuncs;
  86.   pointer prop;
  87.   Bool gray;
  88. } XvropPortRec, *XvropPortPtr;
  89.  
  90. typedef struct _XvropScreenRec {
  91.   void (* ClipNotify)();
  92.   void (* CopyWindow)();
  93.   void (* WindowExposures)();
  94.   Bool (* UnrealizeWindow)();
  95. } XvropScreenRec, *XvropScreenPtr;
  96.  
  97. EXTERNAL int XvropNumEncodings[1] INIT(9);
  98. EXTERNAL int XvropNumPorts[1] INIT(1);
  99. EXTERNAL int XvropNumFormats[1] INIT(1);
  100.  
  101. /* PIP_xxx SYMBOLS TAKEN FROM libpip.h */
  102.  
  103. #ifdef GLOBAL
  104. XvEncodingRec XvropEncodings[1][9] = 
  105. {
  106.   {
  107.     {PIP_COMPOSITE | PIP_NTSC, (ScreenPtr)NULL, 
  108.        "ntsc-composite", 640, 480, 5994, 100},
  109.     {PIP_COMPOSITE | PIP_PAL, (ScreenPtr)NULL, 
  110.        "pal-composite", 768, 572, 50, 1}, 
  111.     {PIP_COMPOSITE | PIP_SECAM, (ScreenPtr)NULL, 
  112.        "secam-composite", 768, 572, 50, 1},
  113.     {PIP_SVIDEO | PIP_NTSC, (ScreenPtr)NULL, 
  114.        "ntsc-svideo", 640, 480, 5994, 100},
  115.     {PIP_SVIDEO | PIP_PAL, (ScreenPtr)NULL, 
  116.        "pal-svideo", 768, 572, 50, 1}, 
  117.     {PIP_SVIDEO | PIP_SECAM, (ScreenPtr)NULL, 
  118.        "secam-svideo", 768, 572, 50, 1},
  119.     {PIP_RGB | PIP_NTSC, (ScreenPtr)NULL, 
  120.        "ntsc-rgb", 640, 480, 5994, 100},
  121.     {PIP_RGB | PIP_PAL, (ScreenPtr)NULL, 
  122.        "pal-rgb", 768, 572, 50, 1}, 
  123.     {PIP_RGB | PIP_SECAM, (ScreenPtr)NULL, 
  124.        "secam-rgb", 768, 572, 50, 1}
  125.   }
  126. };
  127. #else
  128. XvEncodingRec XvropEncodings[1][9];
  129. #endif GLOBAL
  130.  
  131. #define ROP_SCREEN_PROLOGUE(pScreen, props, field)\
  132.   ((pScreen)->field = props->field)
  133.  
  134. #define ROP_SCREEN_EPILOGUE(pScreen, field, wrapper)\
  135.   ((pScreen)->field = wrapper)
  136.  
  137. /* LIST OF RASTEROPS PORT CONTROLS XXX --- MORE LATER */
  138.  
  139. EXTERNAL Atom XvropEncoding;
  140. EXTERNAL Atom XvropHue;
  141. EXTERNAL Atom XvropSaturation;
  142. EXTERNAL Atom XvropBrightness;
  143. EXTERNAL Atom XvropContrast;
  144.  
  145. EXTERNAL Atom XvropSlimyHack;
  146.  
  147. EXTERNAL XvPortPtr XvropPorts;
  148.  
  149. #undef EXTERNAL
  150. #undef INIT
  151.  
  152. #endif XVROP_H
  153.  
  154.  
  155.